package com.visionet.waveletData.web.vo.business;

import java.util.Date;
import java.util.List;

import org.springside.modules.utils.Collections3;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.visionet.waveletData.web.common.utils.PageInfo;
import com.visionet.waveletData.web.common.utils.RegxUtil;
import com.visionet.waveletData.web.entity.JsonDateSerializer;
import com.visionet.waveletData.web.vo.BaseVo;
import com.visionet.waveletData.web.vo.account.UserSimpleVo;

public class QuestionVo extends BaseVo{

	private String titleName;
	private String questionContent;
	private String questionText;
	private Integer questionComefrom;
	private Long orgId;
	private Date createDate;
	private Date updateDate;
	private Long updateBy;
	private Long createBy;
	private String createName;
	private String updateName;
	private Integer praiseCount;
	private Integer delFlag;
	private Integer isDraft;
	private PageInfo pageInfo;
	private String userImgUrl;
	private Integer isSolution;
	
	
	/*---------额外字段-----------------*/
	private Date startDate;
	private Date endDate;
	//当前查询人赞过问题的id,如果不为空则说明查询人赞过
	private Long mentionId;
	private List<UserSimpleVo> mentionList ;
	private String askUsers;
	private Integer answerCount;
	private String queryName;
	private List<Long> userIdList;
	private Integer hasStore;
    private String picture = "";
	
	public String getTitleName() {
		return titleName;
	}
	public void setTitleName(String titleName) {
		this.titleName = titleName;
	}
	
	public Long getOrgId() {
		return orgId;
	}
	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}
	@JsonSerialize(using = JsonDateSerializer.class)
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	public String getQuestionContent() {
		return questionContent;
	}
	public void setQuestionContent(String questionContent) {
		this.questionContent = questionContent;
        if(questionContent!=null){
            List<String> list = RegxUtil.getImgStr(questionContent);
            if(!Collections3.isEmpty(list)){
                this.picture = list.get(0);
            }
        }
	}
	public String getQuestionText() {
		return questionText;
	}
	public void setQuestionText(String questionText) {
		this.questionText = questionText;
	}
	public Integer getQuestionComefrom() {
		return questionComefrom;
	}
	public void setQuestionComefrom(Integer questionComefrom) {
		this.questionComefrom = questionComefrom;
	}
	public Long getUpdateBy() {
		return updateBy;
	}
	public void setUpdateBy(Long updateBy) {
		this.updateBy = updateBy;
	}
	public Long getCreateBy() {
		return createBy;
	}
	public void setCreateBy(Long createBy) {
		this.createBy = createBy;
	}
	public Integer getDelFlag() {
		return delFlag;
	}
	public void setDelFlag(Integer delFlag) {
		this.delFlag = delFlag;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public String getCreateName() {
		return createName;
	}
	public void setCreateName(String createName) {
		this.createName = createName;
	}
	public String getUpdateName() {
		return updateName;
	}
	public void setUpdateName(String updateName) {
		this.updateName = updateName;
	}
	public Integer getPraiseCount() {
		return praiseCount;
	}
	public void setPraiseCount(Integer praiseCount) {
		this.praiseCount = praiseCount;
	}
	public Integer getIsDraft() {
		return isDraft;
	}
	public void setIsDraft(Integer isDraft) {
		this.isDraft = isDraft;
	}
	public PageInfo getPageInfo() {
		return pageInfo;
	}
	public void setPageInfo(PageInfo pageInfo) {
		this.pageInfo = pageInfo;
	}
	public String getUserImgUrl() {
		return userImgUrl;
	}
	public void setUserImgUrl(String userImgUrl) {
		this.userImgUrl = userImgUrl;
	}
	public Long getMentionId() {
		return mentionId;
	}
	public void setMentionId(Long mentionId) {
		this.mentionId = mentionId;
	}
	public String getAskUsers() {
		return askUsers;
	}
	public void setAskUsers(String askUsers) {
		this.askUsers = askUsers;
	}
	public Integer getAnswerCount() {
		return answerCount;
	}
	public void setAnswerCount(Integer answerCount) {
		this.answerCount = answerCount;
	}
	public Integer getIsSolution() {
		return isSolution;
	}
	public void setIsSolution(Integer isSolution) {
		this.isSolution = isSolution;
	}

	public List<UserSimpleVo> getMentionList() {
		return mentionList;
	}
	public void setMentionList(List<UserSimpleVo> mentionList) {
		this.mentionList = mentionList;
	}


	public List<Long> getUserIdList() {
		return userIdList;
	}
	public void setUserIdList(List<Long> userIdList) {
		this.userIdList = userIdList;
	}
	public String getQueryName() {
		return queryName;
	}
	public void setQueryName(String queryName) {
		this.queryName = queryName;
	}
	public Integer getHasStore() {
		return hasStore;
	}
	public void setHasStore(Integer hasStore) {
		this.hasStore = hasStore;
	}

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

}
